import {Editor, EditorOptions as CoreEditorOptions } from '@tiptap/core';
import {TableOfContentData} from '@tiptap-pro/extension-table-of-contents';
import PlaceholderProps from './placeholderProps';
import AiModel from '../extend/ai/AiModel';

interface EditorOptions extends CoreEditorOptions   {
    placeholder?: string | ((PlaceholderProps) => string),
    onSave?: () => void,
    onExport?: (type: String, e: Editor) => void,
    onShare?: () => void,
    onUpdateAnchors?: (content: TableOfContentData) => void,
    uploadFile: (file: File) => Promise<string | ArrayBuffer | null>,
    message?: {
        success: (msg: string) => void,
        error: (msg: string) => void,
        warning: (msg: string) => void,
        info: (msg: string) => void,
        loading: (show: boolean) => void
    },
    AiModel: AiModel
}

export default EditorOptions;